<!-- 测试页面：当作基本模版使用 -->
<template>
  <div>
    <!-- <div v-html="book_html"></div> -->
    <!-- <v-html-panel :url.asyc="url1"></v-html-panel> -->
    <iframe :src="url"  width="100%" height="900px" border="0"></iframe>
  </div>
</template>

<!-- 定义JS变量 -->
<script>
  export default {
    created() {
      this.initBookHtml()
    },
    mounted() {
      // this.url1 = '5books.html'
    },
    data() {
      return {
        book_html: '',
        url: 'http://127.0.0.1:8848/public/src/components/book/5books.html'
      }
    },
    methods: {
      async initBookHtml() {
        // this.book_html = "<h1>fantasticWeb</h1><h1 id='0-公用对象'><span>0 公用对象</span></h1><h2 id='00-响应的sysresult对象'><span>0.0 响应的SysResult对象：</span></h2>"
        let {
          data: res
        } = await this.$http.get(`/book/getOnlineHtml/${1}`)
        console.log(res)
        this.book_html = res
        // window.open('5books.html')
      }
    }
  }
</script>

<!-- 防止组件冲突 -->
<style scoped>
  div {
    color: red;
  }

  div>>>h1 {
    color: green;
  }
</style>
